package com.hopes.bizz.enforcement.hid.vo;

import com.hopes.bizz.enforcement.common.constant.enums.EnforcementSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author daijie
 * @version 1.0
 * @date 2023/7/31 10:23
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "隐患检查记录VO")
public class RiskHidCheckTaskRecordVO extends BaseLogicEntity {

    private static final long serialVersionUID = -7762687990826268860L;

    @Schema(description="id")
    private Long id;

    @Schema(description="任务标识")
    private Long taskId;

    @Schema(description="检查项目")
    private String item;

    @Schema(description="检查表标识")
    private Long riskHidCheckListConfigId;

    @Schema(description="检查表配置标识")
    private Long riskHidCheckContentConfigId;

    @Schema(description="检查内容")
    private String content;

    @Schema(description="检查方式")
    private String way;

    @Schema(description="检查依据")
    private String basis;

    @Schema(description="情况说明")
    private String checkDesc;

    @Schema(description="图片")
    private String phone;

    @Schema(description="视频")
    private String vidoe;

    @Schema(description="结论")
    private Integer conclusion;

    @Schema(description="隐患上报标识")
    private String hidReportedFlag;

    @Schema(description="上报隐患id")
    private Long hidId;

    @Schema(description="描述")
    private String remarks;

    @Schema(description="检查人")
    private Long checkUserId;

    @Schema(description="检查时间")
    private LocalDateTime checkDate;

    @Schema(description="机构ID")
    private Long orgId;

    public String getConclusionStr() {
        return DictResolver.getItemLabelByValue(EnforcementSysDictEnum.risk_hid_checklist_task_conclusion, this.getConclusion());
    }

    public String getCheckUserIdStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_user, this.getCheckUserId());
    }
}
